package com.yufubao.service.service.management.authorization;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yufubao.framework.result.PageUtils;
import com.yufubao.framework.result.ResponseResult;
import com.yufubao.model.dto.management.sys.SaveMenuDto;
import com.yufubao.model.dto.management.sys.UpdateMenuDto;
import com.yufubao.model.pojo.management.authorization.ManagerEntity;
import com.yufubao.model.pojo.management.authorization.MenuEntity;
import com.yufubao.model.vo.management.authorization.RoutersVo;
import com.yufubao.model.vo.management.sys.RoleMenuTreeselectVO;

import java.util.List;
import java.util.Map;

/**
 * 菜单权限表
 *
 * @author zhangzhan
 * @email 52194440@qq.com
 * @date 2024-09-04 15:00:26
 */
public interface MenuService extends IService<MenuEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * @description 根据用户id查询权限信息
     * @param managerId
     * @return java.util.List<java.lang.String>
     * @author zhangyiheng
     * @date 2024/9/4 16:04
     */
    List<String> selectPermsByManagerId(Long managerId);

    /**
     * @description 查询menu 结果是tree的形式
     * @param managerLoginVo
     * @return java.util.List<com.yufubao.model.vo.bms.MenuVo>
     * @author zhangyiheng
     * @date 2024/9/4 16:39
     */
    RoutersVo selectRouterMenuTreeByManagerId(ManagerEntity manager);

    /**
     * @description 查询菜单父子列表
     * @param status
     * @param menuName
     * @return com.yufubao.framework.result.ResponseResult
     * @author zhangyiheng
     * @date 2024/9/12 16:43
     */
    ResponseResult menuParentChildList(String status, String menuName);

    /**
     * @description 新增菜单
     * @param saveMenuDto
     * @return com.yufubao.framework.result.ResponseResult
     * @author zhangyiheng
     * @date 2024/9/12 17:07
     */
    ResponseResult saveMenu(SaveMenuDto saveMenuDto);

    /**
     * @description 菜单修改前回显
     * @param id
     * @return com.yufubao.framework.result.ResponseResult
     * @author zhangyiheng
     * @date 2024/9/12 17:15
     */
    ResponseResult rowBackMenu(Long id);

    /**
     * @description 修改菜单
     * @param updateMenuDto
     * @return com.yufubao.framework.result.ResponseResult
     * @author zhangyiheng
     * @date 2024/9/12 17:20
     */
    ResponseResult updateMenu(UpdateMenuDto updateMenuDto);

    /**
     * @description 删除菜单
     * @param menuId
     * @return com.yufubao.framework.result.ResponseResult
     * @author zhangyiheng
     * @date 2024/9/12 17:25
     */
    ResponseResult deleteMenuById(Long menuId);

    /**
     * @description 获取菜单树接口
     *
     * @return com.yufubao.framework.result.ResponseResult<com.yufubao.model.vo.management.sys.MenuTreeSelectVO>
     * @author zhangyiheng
     * @date 2024/9/12 18:46
     */
    ResponseResult treeselect();

    /**
     * @description 加载对应角色菜单列表树接口
     * @param id
     * @return com.yufubao.framework.result.ResponseResult<com.yufubao.model.vo.management.sys.RoleMenuTreeselectVO>
     * @author zhangyiheng
     * @date 2024/9/12 19:03
     */
    RoleMenuTreeselectVO roleMenuTreeselect(Long id);
}

